<template>
  <el-dialog title="提示" :visible.sync="dialogVisible" width="65%" @close="close">
    <el-descriptions v-for="item in goodsInfo" :key="item.id" :column="4">
      <el-descriptions-item label="商品编码">{{ item.goodsCode }}</el-descriptions-item>
      <el-descriptions-item label="物料名称">{{ item.goodsName }}</el-descriptions-item>
      <el-descriptions-item label="商品规格">{{ item.goodsSpecifications }}</el-descriptions-item>
      <el-descriptions-item label="数量">{{ item.quantity }}</el-descriptions-item>
    </el-descriptions>
  </el-dialog>
</template>

<script>
export default {
  name: 'ShelfInfoModal',
  props: {
    goodsInfo: {
      type: Array,
      default: () => []
    },
    title: {
      type: String,
      default: '详情'
    }
  },
  data() {
    return {
      dialogVisible: false
    }
  },
  methods: {
    open() {
      this.dialogVisible = true
    },
    close() {
      this.dialogVisible = false
    }
  }
}
</script>

<style></style>
